from django.db import models


class Author(models.Model):

    author_name = models.CharField(max_length=24)
    password = models.CharField(max_length=30)
    avatar = models.ImageField(upload_to='users/%Y%m%d/', blank=True)

    def __str__(self):
        return self.author_name

    class Meta:
        db_table = 'tb_author'
        verbose_name = '作者'
        verbose_name_plural = verbose_name
